package com.frejoys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.frejoys.dao.entity.AgentRoleGroupRatio;
import com.frejoys.dao.mapper.AgentRoleGroupRatioMapper;
import com.frejoys.service.AgentRoleGroupRatioService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class AgentRoleGroupRatioServiceImpl extends ServiceImpl<AgentRoleGroupRatioMapper, AgentRoleGroupRatio> implements AgentRoleGroupRatioService {

    @Override
    public AgentRoleGroupRatio getInfo(Integer agentRoleGroupId) {
        LambdaQueryWrapper<AgentRoleGroupRatio> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(AgentRoleGroupRatio::getAgentRoleGroupId, agentRoleGroupId);
        return getOnly(wrapper);
    }

}
